× Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16 Lesson 17 Lesson 18 Lesson 19 Lesson 20 Lesson 21 Lesson 22 Lesson 23 Lesson 24 Lesson 25 Mini Lesson 1 Mini Lesson 2 Mini Lesson 3 Mini Lesson 4 Mini Lesson 5

Lessons

Lesson 15 - Modules and Packages

Modules in Python can be imported into a python file and be able to use its own classes. For example, say that we are making a new python file, but we want to be able to make new Dogs using the Dog Class from Lesson 12, it would look something like this, assuming that the name of the python file that has the Dog Class is named Dog.py: import Dog Jeff = Dog('Chihuahua', 'Brown')

There are many modules that you can import that come standard with Python 3, here is a link to a full list of them.

Once you have become more familiar with coding, you may find the need for a set of modules, also known as a package, that isn't standard in python, and you can use this website to download third-party packages.